package com.slkj.shilixiaoyuanapp.ui.teacher.tool.meeting;

import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.api.InjectParam;
import com.slkj.shilixiaoyuanapp.R;
import com.slkj.shilixiaoyuanapp.base.ActivityInfo;
import com.slkj.shilixiaoyuanapp.base.BaseActivity;
import com.slkj.shilixiaoyuanapp.data.UserRequest;
import com.slkj.shilixiaoyuanapp.entity.ToolMeetingDetailEntity;
import com.slkj.shilixiaoyuanapp.net.HttpHeper;
import com.slkj.shilixiaoyuanapp.net.callback.CommonCallBack;
import com.slkj.shilixiaoyuanapp.ui.common.ChosePeopleActivity;
import com.slkj.shilixiaoyuanapp.util.TimeUtils;
import com.slkj.shilixiaoyuanapp.view.NumberEditText;
import com.slkj.shilixiaoyuanapp.view.StateLayout;

import butterknife.BindView;
import butterknife.OnClick;

@ActivityInfo(layout = R.layout.activity_meeting_passed, title = "已通过")
public class MeetingPassedActivity extends BaseActivity {
    @InjectParam
    int id;
    @InjectParam
    ToolMeetingDetailEntity data;
    @BindView(R.id.tv_yhry)
    TextView tvYhry;
    @BindView(R.id.tv_time)
    TextView tvTime;
    @BindView(R.id.edit_pos)
    EditText editPos;
    @BindView(R.id.edit_name)
    EditText editName;
    @BindView(R.id.tv_spr)
    TextView tvSpr;
    @BindView(R.id.tv_user_name)
    TextView tvUserName;
    @BindView(R.id.tv_now_day_time)
    TextView tvNowDayTime;
    @BindView(R.id.edit_content)
    NumberEditText editContent;
    @BindView(R.id.tv_remark)
    TextView tvRemark;
    @BindView(R.id.iv_select_spr)
    ImageView iv_select_spr;
    @Override
    protected void init() {
        MeetingPassedActivity__JumpCenter.bind(this);
        tvUserName.setText(UserRequest.getInstance().getUser().getUser().getUName());
        tvNowDayTime.setText(data.getApplyDate());


        setViewData();
        tvRemark.setText(data.getRefute());
        iv_select_spr.setVisibility(View.GONE);
    }

    /**
     * 获取数据成功设置数据
     */
    private void setViewData() {
        tvYhry.setText(ChosePeopleActivity.getPeoplesInfos(data.getTeacherName()));
        tvTime.setText(data.getDatetime());
        editName.setText(data.getTitle());
        editPos.setText(data.getPlace());
        editContent.setText(data.getBody());
        tvSpr.setText(ChosePeopleActivity.getPeoplesInfos(data.getAuditor()));

    }



}
